package com.example.itensyuan0609.util;

import android.app.Activity;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;

import androidx.appcompat.widget.AppCompatImageView;

public class BackImage extends AppCompatImageView {
    Activity activity;

    public BackImage(Context context, AttributeSet attrs) {
        super(context, attrs);
        activity = (Activity) context;
        BackImage.this.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                activity.finish();
            }
        });
    }

}
